import React,{useEffect, useState} from 'react';
import {
    View, 
    Text
} from 'react-native';
import ListModel from '../models/List';

const List = () => {

    const listModel = new ListModel();
    const [courseFields, setCourseFields] = useState([]);
    const getCourseFields = () => {
        listModel.getCourseFields().then((res) => {
            setCourseFields(
                [{"field":"all", field_name:"全部"}].concat(res)
        )
    })}
    useEffect(() => {
        getCourseFields();
    }, []);
    
    const getCourses= (field) => {
        
    }
    return (
        <View>
          <Text>ListPage</Text>  
        </View>
    );
}

export default List;
